Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit lock scope to prevent recursive locking #53

Merged
merged 1 commit into from
Jun 6, 2016
Merged

Limit lock scope to prevent recursive locking #53

merged 1 commit into from
Jun 6, 2016

Conversation

johnnyt
Copy link
Contributor

@johnnyt johnnyt commented Oct 24, 2014

Fixes #52

@tarcieri
Copy link
Contributor

tarcieri commented Jun 6, 2016

Wow, I stumbled upon this PR which is nearing being open for two years, my bad...

Will review this when I have some time.

@tarcieri tarcieri merged commit 3d45160 into socketry:master Jun 6, 2016
@tarcieri
Copy link
Contributor

tarcieri commented Jun 7, 2016

So I merged this, but I do have some concerns...

The monitors are mutable, and since the lock isn't held when they're being read, the readiness may get mutated by another thread.

I consider the Ruby version to be the reference implementation the other (real) drivers (that you should actually use in practice) implement, so I'm not sure I actually like this solution.

It broke the test suite, but the failures look unrelated to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive locking (pure ruby)
2 participants